# pragma once

# include <string>
# include <vector>

# include "geometry2d.hpp"
# include "geometry3d.hpp"


namespace io {

  /*! @brief Class for IO exception
   */
  class IOException {
  public:
    IOException(std::string const& reason) throw() : what_(reason) {}

    inline std::string reason() const throw() {
      return what_;
    }

  private:
    std::string what_;
  };

  /*! @brief Load obj-file into the mesh
   *
   * @param[in] filename name of ot the obj-file
   * @return mesh with data
   *
   */
  //geometry::Mesh loadMeshObj(std::string const& filename);


  /*! @brief Load mesh from Octave format
   *
   * @param[in] filename name of the file with data
   * @return mesh
   */
  //geometry::Mesh loadMeshOct(std::string const& filename);


  /*! @brief Load points from the file
   *
   * @param[in] filename name of the file with data
   * @return container with points
   */
  std::vector<geometry::d3::Point> loadPoints(std::string const& filename);


  /*! @brief Write point to file
   *
   * @param[in] filename file for storing points.
   * @param[in] v container (vector) with points
   */
  void writePoints(std::string const& filename, std::vector<geometry::d3::Point> const& points);

}
